// robust input output class
#ifndef __ROBUSTIO__
#define __ROBUSTIO__

class RobustIO {
public:
    char* readName(const char* outtext); // reads a good name from user
    char* readAddress(const char* outtext); // reads a good address from user
    
    char* readCommand(const char* outtext); // requests 'outtext'
    // and returns it upcased
    int readInt(const char* outtext, int max, int min = 0); // returns an int
// add 'max' = 5billion gazillion or similar, and move 'min' back in front of 'max'?// between min and max
    char* readFileName(const char* outtext, char* defaultfilename, bool usedefault = 1); 
    // reads a filename from user
////////////////////////////// NOT YET IMPLEMENTED PROPERLY /////////////////////////////
    char* readDate(); // read a date into a char [] and return that
    bool goodName(char*  checkname); // checks a name
    // names holds only letters, whitespaces and/or hyphens
    bool goodAddress(char* checkaddress); // checks address
    // addresses holds only letters, whitespaces and/or numbers
    char* stripCharptr(char* striptext); // removes whitespaces at each end of string
    char* readFileString(ifstream* in); // reads a string from file-stream and returns a string
};
#endif
